//
//  CEHomeListCell.m
//  digitalCurrency
//
//  Created by 来迎宾 on 2019/4/4.
//  Copyright © 2019年 XinHuoKeJi. All rights reserved.
//

#import "CEHomeListCell.h"


@implementation CEHomeListCell

+ (instancetype)createTableView:(UITableView *)tableView {
    CEHomeListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"listcell"];
    cell.selectionStyle  = UITableViewCellSelectionStyleNone;
    cell.backgroundColor = [UIColor colorWithHEX:@"2a2f42"];

    [cell makeViews];
    
    return cell;
}

- (void)makeViews {
    
    [self.contentView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(20);
        make.height.mas_equalTo(20);
    }];
    
    
    [self.contentView addSubview:self.countLabel];
    [self.countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(10);
        make.right.mas_equalTo(-15);
        make.height.mas_equalTo(18);
    }];
    
    
    [self.contentView addSubview:self.timeLabel];
    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(35);
        make.right.mas_equalTo(-15);
        make.height.mas_equalTo(12);
    }];
    
}

- (UILabel *)titleLab {
    if (!_titleLab) {
        _titleLab = [[UILabel alloc] init];
        _titleLab.font = [UIFont systemFontOfSize:17];
        _titleLab.textColor = [UIColor colorWithHEX:@"8C8F97"];
        _titleLab.text = LocalizationKey(@"Convert");
    }
    
    return _titleLab;
}

- (UILabel *)countLabel {
    if (!_countLabel) {
        _countLabel = [[UILabel alloc] init];
        _countLabel.font = [UIFont systemFontOfSize:17];
        _countLabel.textColor = [UIColor colorWithHEX:@"8C8F97"];
        _countLabel.text = @"18.0";
        _countLabel.textAlignment = NSTextAlignmentRight;
    }
    
    return _countLabel;
}

- (UILabel *)timeLabel {
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc] init];
        _timeLabel.font = [UIFont systemFontOfSize:12];
        _timeLabel.textColor = [UIColor colorWithHEX:@"8C8F97"];
        _timeLabel.text = @"1970-01-01 00:00:01";
        _timeLabel.textAlignment = NSTextAlignmentRight;
    }
    
    return _timeLabel;
}



@end
